classdef Teacher
    %Teacher Summary of this class goes here
    %   Detailed explanation goes here

    properties (Access = private)
        name
        age
    end

    methods
        function obj = Teacher(name, age)
            obj.name = name;
            obj.age = age;
            obj.dispinfo();
        end

        function out_str = getName(obj)
            %getName Summary of this method goes here
            %   Detailed explanation goes here
            out_str = obj.name;
        end
    end
end